#pragma once

//A message is what is used by every object that has to interact with something that it doesn't have direct access to.
//Examples:
// The player will send its stats(health and gold) to the Menu class
// The enemy sends a (DamagePlayer) message to the player class
//
//Any and all Message are handled by the Messaging class.
//Messages
class	Message
{
public:
	int*		ReceiverID;
	float*		Info;
	eMessage	MessageType;

	Message(): ReceiverID(NULL),Info(NULL),MessageType(MESSAGE_SIZE){}
	Message(eMessage M,float* I,int* R): Info(I)
		, MessageType(M)
		, ReceiverID(R)
	{}
	~Message(){
		delete ReceiverID;
		delete Info;
		MessageType = NULL_MESSAGE;
	}
	bool operator ==(Message Rhs)
	{
		return(this->MessageType == Rhs.MessageType
			&& this->Info == Rhs.Info
			&& this->ReceiverID == Rhs.ReceiverID);
	}
	bool operator >(Message Rhs)
	{
		return(this->MessageType > Rhs.MessageType
			&& this->Info > Rhs.Info
			&& this->ReceiverID > Rhs.ReceiverID);
	}
	bool operator <(Message Rhs)
	{
		return(this->MessageType < Rhs.MessageType
			&& this->Info < Rhs.Info
			&& this->ReceiverID < Rhs.ReceiverID);
	}
};